frameworks.modules.BaseModule = function(id, view, options){
	this.view = view;
	this.options = options;
	this.id = id;
	this.moduleController = facade.moduleController;
};
frameworks.modules.BaseModule.prototype = new frameworks.widgets.Watchers();
frameworks.modules.BaseModule.prototype.dispatchAction = function(aid,args){
	var sid = this.id + "_" + aid;
	if(typeof(this.moduleController[sid]) == "function"){
		if(!args){args = [];}
		return this.moduleController[sid].apply(this.moduleController,args);
	}else{
		return null;
	}
};
frameworks.modules.BaseModule.prototype.buildEnvironment = function(){
	var result = this.dispatchAction("build");
	if(result instanceof frameworks.widgets.ResultProxy){
		result.addProgressCallback(this.buildEnvironmentProgress);
		result.addCompleteCallback(this.buildEnvironmentCompleted);
	}else if(result instanceof frameworks.widgets.Result){
		this.buildEnvironmentCompleted(result);
	}
};
frameworks.modules.BaseModule.prototype.buildEnvironmentProgress = function(result){
		
};
frameworks.modules.BaseModule.prototype.buildEnvironmentCompleted = function(result){
		
};


